//类型别名----多次使用
type MyNumber = number;
const age: MyNumber = 18;

//给Id起别名
type IDtype = number | string;
function prinitID(id: IDtype) {
  console.log(id);
}

type PointType = { x: number; y: number; z?: number };

function printPosition(point: PointType) {
  console.log(point.x);
  console.log(point.y);
  console.log(point.z);
}
